home *** CD-ROM | disk | FTP | other *** search
/ PD ROM 1 / PD ROM Volume I - Macintosh Software from BMUG (1988).iso / Stacks / Hyper Education / Organizational Aids / Student Teacher / background_4916.txt < prev    next >
Encoding:
Text File  |  1988-04-09  |  4.2 KB  |  191 lines

  1. -- background: 4916 from stack: in
  2. -- bmap block id: 4364
  3. -- flags: 4000
  4. -- background id: 0
  5. -- name: Tests
  6. ----- HyperTalk script -----
  7. on EnterTest
  8.   Global ThePass,TheWeight
  9.   ask "What is this tests weight?"
  10.   Put it into field "Weight"
  11.   if it is "" then
  12.     answer "Do You Want to Delete This Test?" with "OK" or "Cancel"
  13.     if it is "OK" then
  14.       Domenu "Delete Card"
  15.       Pop Card
  16.       exit to hypercard
  17.     else
  18.       Put 1 into x
  19.     end if
  20.     Put it into TheWeight
  21.     Put "" into TheNamesScores
  22.     Put 1 into x
  23.     Put number of lines in field "Scores"+1 into numtimes
  24.     Repeat forever
  25.       Put item 1 of line x of field "Scores" into Name
  26.       Put item 2 of line x of TheNamesScores into Score
  27.       Ask "Enter the grade for"&&Name with score
  28.       if it is "" then
  29.         Put x-1 into x
  30.       else
  31.         Put Name&","&it into newline
  32.         Put newline into line x of TheNamesScores
  33.         Put x+1 into x
  34.       end if
  35.       if x is numtimes then exit repeat
  36.       if x is 0 then
  37.         ask "What is this tests weight?" with field "Weight"
  38.         if it is not empty then
  39.           Put it into field "Weight"
  40.           Put 1 into x
  41.         else
  42.           answer "Do You Want to Delete This Test?" with "OK" or "Cancel"
  43.           if it is "OK" then
  44.             Domenu "Delete Card"
  45.             Pop Card
  46.             exit to hypercard
  47.           else
  48.             Put 1 into x
  49.           end if
  50.         end if
  51.       end if
  52.  
  53.     end repeat
  54.     Put theNamesScores into field "Scores"
  55.     Pop Card
  56.     Put TheNamesScores into ThePass
  57.     Herearegrades
  58.   end entertest
  59.  
  60.  
  61.  
  62. -- part 1 (field)
  63. -- low flags: 01
  64. -- high flags: 0000
  65. -- rect: left=215 top=25 right=43 bottom=439
  66. -- title width / last selected line: 0
  67. -- icon id / first selected line: 0 / 0
  68. -- text alignment: 0
  69. -- font id: 2
  70. -- text size: 12
  71. -- style flags: 256
  72. -- line height: 16
  73. -- part name: Test Name
  74.  
  75.  
  76. -- part 2 (field)
  77. -- low flags: 01
  78. -- high flags: 0000
  79. -- rect: left=215 top=25 right=43 bottom=439
  80. -- title width / last selected line: 0
  81. -- icon id / first selected line: 0 / 0
  82. -- text alignment: 0
  83. -- font id: 2
  84. -- text size: 12
  85. -- style flags: 256
  86. -- line height: 16
  87. -- part name: Test Name
  88.  
  89.  
  90. -- part 3 (field)
  91. -- low flags: 01
  92. -- high flags: 0000
  93. -- rect: left=214 top=45 right=62 bottom=439
  94. -- title width / last selected line: 0
  95. -- icon id / first selected line: 0 / 0
  96. -- text alignment: 0
  97. -- font id: 2
  98. -- text size: 12
  99. -- style flags: 256
  100. -- line height: 16
  101. -- part name: Class Name
  102.  
  103.  
  104. -- part 4 (field)
  105. -- low flags: 01
  106. -- high flags: 0007
  107. -- rect: left=140 top=127 right=271 bottom=388
  108. -- title width / last selected line: 0
  109. -- icon id / first selected line: 0 / 0
  110. -- text alignment: 0
  111. -- font id: 2
  112. -- text size: 10
  113. -- style flags: 256
  114. -- line height: 13
  115. -- part name: Scores
  116.  
  117.  
  118. -- part 5 (button)
  119. -- low flags: 00
  120. -- high flags: 2000
  121. -- rect: left=265 top=278 right=301 bottom=295
  122. -- title width / last selected line: 0
  123. -- icon id / first selected line: 27009 / 27009
  124. -- text alignment: 1
  125. -- font id: 0
  126. -- text size: 12
  127. -- style flags: 0
  128. -- line height: 16
  129. -- part name: New Button
  130. ----- HyperTalk script -----
  131. on mouseUp
  132.   go to next card of this bkgnd
  133. end mouseUp
  134.  
  135.  
  136.  
  137. -- part 6 (button)
  138. -- low flags: 00
  139. -- high flags: 2000
  140. -- rect: left=231 top=278 right=301 bottom=261
  141. -- title width / last selected line: 0
  142. -- icon id / first selected line: 9301 / 9301
  143. -- text alignment: 1
  144. -- font id: 0
  145. -- text size: 12
  146. -- style flags: 0
  147. -- line height: 16
  148. -- part name: New Button
  149. ----- HyperTalk script -----
  150. on mouseUp
  151.   go to previous card of this bkgnd
  152. end mouseUp
  153.  
  154.  
  155.  
  156. -- part 7 (button)
  157. -- low flags: 00
  158. -- high flags: A000
  159. -- rect: left=8 top=25 right=70 bottom=75
  160. -- title width / last selected line: 0
  161. -- icon id / first selected line: 2162 / 2162
  162. -- text alignment: 1
  163. -- font id: 0
  164. -- text size: 12
  165. -- style flags: 0
  166. -- line height: 16
  167. -- part name: Back to Class
  168. ----- HyperTalk script -----
  169. on mouseUp
  170.   set lockscreen to true
  171.   put field "Class Name" into holder
  172.   go to First Card
  173.   find holder in field "Class Name"
  174.   click at 0,0
  175. end mouseUp
  176.  
  177.  
  178.  
  179. -- part 9 (field)
  180. -- low flags: 01
  181. -- high flags: 0000
  182. -- rect: left=209 top=78 right=95 bottom=268
  183. -- title width / last selected line: 0
  184. -- icon id / first selected line: 0 / 0
  185. -- text alignment: 1
  186. -- font id: 2
  187. -- text size: 12
  188. -- style flags: 256
  189. -- line height: 16
  190. -- part name: Weight
  191.